Skip to content

feat(explorer): show compact counts and generate editable count queries - #753

Closed
2160039878-cyber wants to merge 2 commits into
libredb:mainfrom
2160039878-cyber:feat/table-count-query-702
Closed

feat(explorer): show compact counts and generate editable count queries#753
2160039878-cyber wants to merge 2 commits into
libredb:mainfrom
2160039878-cyber:feat/table-count-query-702

Conversation

@2160039878-cyber

@2160039878-cyber 2160039878-cyber commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

Description

Explorer row-count badges now use compact K/M/B/T notation. SQL table menus offer Select Table Count, which opens SELECT COUNT(*) in a new editable tab. Users can add filters before running it; choosing the action never executes the count or starts table profiling.

Type of Change

  • New feature (non-breaking)
  • Documentation and test updates

Changes Made

  • Format reported counts with the platform's compact number formatter, including promotion at rounding boundaries. Missing counts remain absent; zero remains visible. The badge still reports the provider's count, which can be an estimate.
  • Reuse dialect-aware qualified-name quoting and statement terminators. The action is offered only for addressable SQL tables when a handler is available, covering both context and overflow menus.
  • Wire the editable tab flow through the standalone desktop/mobile and embedded workspace shells. Existing tabs are preserved, and mobile returns to the editor. No new execution path or provider capability is introduced.

Testing

  • TDD: seven component assertions and three hook cases failed before implementation.
  • bun run test:components --pass-with-no-tests -t 'Studio|Sidebar|SchemaExplorer|TableItem': 382 matching tests passed, 0 failed.
  • bun run test:hooks --pass-with-no-tests -t 'useTabManager': 34 passed, 0 failed.
  • bun run test:unit --pass-with-no-tests -t 'generateCountQuery|generateSelectQuery|generateTableQuery|quoteIdentifier|quoteQualifiedName': 124 passed, 0 failed.
  • Regressions cover large and absent counts, rounding, both menu paths, unsupported providers, missing callbacks, shell-to-row wiring, tab preservation/editing, no automatic execution, escaped identifiers and dialect terminators.
  • Passed locally: format, lint, typecheck, knip, readme:check, chart:check, channels:showcase:check, security:check, production build, build:lib and attw.
  • Full local tests / coverage and E2E were not completed: the Windows host lacks Helm/chart dependencies, Docker is unavailable, and existing SQLite cleanup tests encounter Windows file-lock errors. Official Linux CI verifies the full suite and 100% line-coverage gate.

Environment: Windows, Node.js 24.18.1, Bun 1.4.2. Both builds ran from a clean checkout of the submitted commit with real local dependencies.

Checklist

  • Reviewed the diff and reused existing query generation and tab flows.
  • Added regression tests and updated README.
  • Required CI test job passes the 100% line-coverage gate on commit 10ced29.

Additional Notes

AI-assisted implementation and test execution using Codex. No new dependencies, provider changes or automatic database requests. Executing an exact count can be expensive on a large table, so execution stays under the user's existing Run control.

Current commit CI: official Linux run; 20 checks passed and the two expected Image Scan / fork SonarCloud jobs were skipped.

@codecov

codecov Bot commented Sep 9, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@cevheri cevheri added the loop:needs-moderator-action Flagged by the maintainer loop: suspicious content or a decision only a human can make label Sep 9, 2026
@cevheri

cevheri commented Sep 10, 2026

Copy link
Copy Markdown
Member

Closing as an automated bulk submission that this project cannot absorb.

This account opened 35 pull requests here in under 25 hours, a median of 17 minutes apart and four inside the same 13 seconds. That is machine cadence, not a person working through a backlog, and 35 of its 41 pull requests across all of GitHub targeted this one repository. On the earlier ones I did review, the review threads were never answered and review was never re-requested, so nothing closed out.

This pull request never reached review, and the account is now blocked at the organization level, so it cannot move forward.

If a person wants to contribute here: open one issue, wait for assignment, and send one pull request at a time.

@cevheri cevheri closed this Sep 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

loop:needs-moderator-action Flagged by the maintainer loop: suspicious content or a decision only a human can make

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants